
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>通用 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="container.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../introduction/environment.html">
            
                <a href="../introduction/environment.html">
            
                    
                    环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../introduction/hello.html">
            
                <a href="../introduction/hello.html">
            
                    
                    HelloWorld
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../introduction/dev-and-debug.html">
            
                <a href="../introduction/dev-and-debug.html">
            
                    
                    开发与调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    参考
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../framework/file.html">
            
                <a href="../framework/file.html">
            
                    
                    文件组织
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../framework/manifest.html">
            
                <a href="../framework/manifest.html">
            
                    
                    manifest文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../framework/nml.html">
            
                <a href="../framework/nml.html">
            
                    
                    nml文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../framework/page.html">
            
                <a href="../framework/page.html">
            
                    
                    页面与组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    组件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.1" data-path="general.html">
            
                <a href="general.html">
            
                    
                    通用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="container.html">
            
                <a href="container.html">
            
                    
                    容器组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="basics.html">
            
                <a href="basics.html">
            
                    
                    基础组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="form.html">
            
                <a href="form.html">
            
                    
                    表单组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="media.html">
            
                <a href="media.html">
            
                    
                    媒体组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    接口
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../api/general.html">
            
                <a href="../api/general.html">
            
                    
                    通用规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../api/basic.html">
            
                <a href="../api/basic.html">
            
                    
                    基本功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../api/interface.html">
            
                <a href="../api/interface.html">
            
                    
                    界面交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../api/request.html">
            
                <a href="../api/request.html">
            
                    
                    网络访问
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../api/storage.html">
            
                <a href="../api/storage.html">
            
                    
                    文件数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../api/system.html">
            
                <a href="../api/system.html">
            
                    
                    系统能力
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../api/media.html">
            
                <a href="../api/media.html">
            
                    
                    图形图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../api/service.html">
            
                <a href="../api/service.html">
            
                    
                    厂商服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../api/third.html">
            
                <a href="../api/third.html">
            
                    
                    第三方服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >通用</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x901A;&#x7528;">&#x901A;&#x7528;</h2>
<h3 id="&#x901A;&#x7528;&#x4E8B;&#x4EF6;">&#x901A;&#x7528;&#x4E8B;&#x4EF6;</h3>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">click</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x88AB;&#x70B9;&#x51FB;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">longpress</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x88AB;&#x957F;&#x6309;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">focus</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x83B7;&#x5F97;&#x7126;&#x70B9;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">blur</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x5931;&#x53BB;&#x7126;&#x70B9;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">appear</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x51FA;&#x73B0;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">disappear</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7EC4;&#x4EF6;&#x6D88;&#x5931;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">swipe</td>
<td style="text-align:left">direction:String</td>
<td style="text-align:left">swipe &#x4E8B;&#x4EF6;&#x5728;&#x7528;&#x6237;&#x5728;&#x67D0;&#x4E2A;&#x5143;&#x7D20;&#x4E0A;&#x5FEB;&#x901F;&#x6ED1;&#x52A8;&#x8D85;&#x8FC7; 30px &#x65F6;&#x88AB;&#x89E6;&#x53D1;&#x3002;</td>
</tr>
</tbody>
</table>
<h3 id="&#x901A;&#x7528;&#x5C5E;&#x6027;">&#x901A;&#x7528;&#x5C5E;&#x6027;</h3>
<h4 id="&#x5E38;&#x89C4;&#x5C5E;&#x6027;">&#x5E38;&#x89C4;&#x5C5E;&#x6027;</h4>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x552F;&#x4E00;&#x6807;&#x8BC6;</td>
</tr>
<tr>
<td style="text-align:left">style</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6837;&#x5F0F;&#x58F0;&#x660E;</td>
</tr>
<tr>
<td style="text-align:left">class</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5F15;&#x7528;&#x6837;&#x5F0F;&#x8868;</td>
</tr>
<tr>
<td style="text-align:left">disabled</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left">false</td>
<td style="text-align:left">&#x8868;&#x660E;&#x5F53;&#x524D;&#x7EC4;&#x4EF6;&#x662F;&#x5426;&#x53EF;&#x7528;</td>
</tr>
</tbody>
</table>
<h4 id="&#x6E32;&#x67D3;&#x5C5E;&#x6027;">&#x6E32;&#x67D3;&#x5C5E;&#x6027;</h4>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">for</td>
<td style="text-align:left"><code>&lt;array&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6839;&#x636E;&#x6570;&#x636E;&#x5217;&#x8868;&#xFF0C;&#x5FAA;&#x73AF;&#x5C55;&#x5F00;&#x5F53;&#x524D;&#x6807;&#x7B7E;</td>
</tr>
<tr>
<td style="text-align:left">if</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6839;&#x636E;&#x6570;&#x636E;boolean&#x503C;&#xFF0C;&#x6DFB;&#x52A0;&#x6216;&#x79FB;&#x9664;&#x5F53;&#x524D;&#x6807;&#x7B7E;</td>
</tr>
<tr>
<td style="text-align:left">show</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6839;&#x636E;&#x6570;&#x636E;boolean&#x503C;&#xFF0C;&#x663E;&#x793A;&#x6216;&#x9690;&#x85CF;&#x5F53;&#x524D;&#x6807;&#x7B7E;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;&#x63A7;&#x5236;{ display: flex / none }</td>
</tr>
</tbody>
</table>
<p>&#x6E32;&#x67D3;&#x5C5E;&#x6027;&#x5DE5;&#x4F5C;&#x65B9;&#x5F0F;&#x8BE6;&#x89C1;&#x201C;template&#x6A21;&#x677F;&#x201D;&#x3002;</p>
<p>&#x5C5E;&#x6027;&#x4E0E;&#x6837;&#x5F0F;&#x4E0D;&#x80FD;&#x6DF7;&#x7528;&#xFF0C;&#x4E0D;&#x80FD;&#x5728;&#x5C5E;&#x6027;&#x5B57;&#x6BB5;&#x4E2D;&#x8FDB;&#x884C;&#x6837;&#x5F0F;&#x8BBE;&#x7F6E;&#x3002;</p>
<h3 id="&#x901A;&#x7528;&#x6837;&#x5F0F;">&#x901A;&#x7528;&#x6837;&#x5F0F;</h3>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">width</td>
<td style="text-align:left"><code>&lt;length&gt;</code>&#x3001;<code>&lt;percentage&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x672A;&#x8BBE;&#x7F6E;&#x65F6;&#x4F7F;&#x7528;&#x7EC4;&#x4EF6;&#x81EA;&#x8EAB;&#x5185;&#x5BB9;&#x9700;&#x8981;&#x7684;&#x5BBD;&#x5EA6;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">height</td>
<td style="text-align:left"><code>&lt;length&gt;</code>&#x3001;<code>&lt;percentage&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x672A;&#x8BBE;&#x7F6E;&#x65F6;&#x4F7F;&#x7528;&#x7EC4;&#x4EF6;&#x81EA;&#x8EAB;&#x5185;&#x5BB9;&#x9700;&#x8981;&#x7684;&#x9AD8;&#x5EA6;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">padding</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x58F0;&#x660E;&#x4E2D;&#x8BBE;&#x7F6E;&#x6240;&#x6709;&#x7684;&#x5185;&#x8FB9;&#x8DDD;&#x5C5E;&#x6027;&#xFF0C;&#x8BE5;&#x5C5E;&#x6027;&#x53EF;&#x4EE5;&#x6709;1&#x5230;4&#x4E2A;&#x503C;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">padding-[left/top/right/bottom]</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">margin</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x58F0;&#x660E;&#x4E2D;&#x8BBE;&#x7F6E;&#x6240;&#x6709;&#x7684;&#x5916;&#x8FB9;&#x8DDD;&#x5C5E;&#x6027;&#xFF0C;&#x8BE5;&#x5C5E;&#x6027;&#x53EF;&#x4EE5;&#x6709;1&#x5230;4&#x4E2A;&#x503C;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">margin-[left/top/right/bottom]</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">border</td>
<td style="text-align:left"></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x58F0;&#x660E;&#x4E2D;&#x8BBE;&#x7F6E;&#x6240;&#x6709;&#x7684;&#x8FB9;&#x6846;&#x5C5E;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x6309;&#x987A;&#x5E8F;&#x8BBE;&#x7F6E;&#x5C5E;&#x6027;width style color&#xFF0C;&#x4E0D;&#x8BBE;&#x7F6E;&#x7684;&#x503C;&#x4E3A;&#x9ED8;&#x8BA4;&#x503C;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">border-style</td>
<td style="text-align:left">dotted&#x3001;dashed&#x3001;solid</td>
<td style="text-align:left">solid</td>
<td style="text-align:left">&#x6682;&#x65F6;&#x4EC5;&#x652F;&#x6301;1&#x4E2A;&#x503C;&#xFF0C;&#x4E3A;&#x5143;&#x7D20;&#x7684;&#x6240;&#x6709;&#x8FB9;&#x6846;&#x8BBE;&#x7F6E;&#x6837;&#x5F0F;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">border-width</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x58F0;&#x660E;&#x4E2D;&#x8BBE;&#x7F6E;&#x5143;&#x7D20;&#x7684;&#x6240;&#x6709;&#x8FB9;&#x6846;&#x5BBD;&#x5EA6;&#xFF0C;&#x6216;&#x8005;&#x5355;&#x72EC;&#x4E3A;&#x5404;&#x8FB9;&#x8FB9;&#x6846;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">border-[left/top/right/bottom]-width</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">border-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">black</td>
<td style="text-align:left">&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x58F0;&#x660E;&#x4E2D;&#x8BBE;&#x7F6E;&#x5143;&#x7D20;&#x7684;&#x6240;&#x6709;&#x8FB9;&#x6846;&#x989C;&#x8272;&#xFF0C;&#x6216;&#x8005;&#x5355;&#x72EC;&#x4E3A;&#x5404;&#x8FB9;&#x8FB9;&#x6846;&#x8BBE;&#x7F6E;&#x989C;&#x8272;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">border-[left/top/right/bottom]-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">black</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">border-radius</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x5706;&#x89D2;&#x65F6;&#x53EA;&#x4F7F;&#x7528;border-width&#xFF0C;border-[left/top/right/bottom]-width&#xFF0C;&#x65E0;&#x6548;&#x5706;&#x89D2;&#x65F6;&#x53EA;&#x4F7F;&#x7528;border-color&#xFF0C;border-[left/top/right/bottom]-color&#x65E0;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">border-[top/bottom]-[left/right]-radius</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">background</td>
<td style="text-align:left"><code>&lt;linear-gradient&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x652F;&#x6301;&#x6E10;&#x53D8;&#x6837;&#x5F0F;&#xFF0C;&#x6682;&#x65F6;&#x4E0D;&#x80FD;&#x4E0E;background-color&#x3001;background-image&#x540C;&#x65F6;&#x4F7F;&#x7528;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">background-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">background-image</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6682;&#x65F6;&#x4E0D;&#x652F;&#x6301;&#x4E0E;background-color&#xFF0C;border-color&#x540C;&#x65F6;&#x4F7F;&#x7528;&#xFF1B;&#x4E0D;&#x652F;&#x6301;&#x7F51;&#x7EDC;&#x56FE;&#x7247;&#x8D44;&#x6E90;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x672C;&#x5730;&#x56FE;&#x7247;&#x8D44;&#x6E90;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">background-size</td>
<td style="text-align:left">contain&#x3001;cover&#x3001;auto&#x3001;<code>&lt;length&gt;</code>&#x3001;<code>&lt;percentage&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x5927;&#x5C0F;</td>
</tr>
<tr>
<td style="text-align:left">opacity</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0xff</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">display</td>
<td style="text-align:left">flex&#x3001;none</td>
<td style="text-align:left">flex</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">visibility</td>
<td style="text-align:left">visible&#x3001;hidden</td>
<td style="text-align:left">visible</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">flex</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x7236;&#x5BB9;&#x5668;&#x4E3A;<code>&lt;div&gt;</code>&#x3001;<code>&lt;list-item&gt;</code>&#x3001;<code>&lt;tabs&gt;</code>&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">flex-grow</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x7236;&#x5BB9;&#x5668;&#x4E3A;<code>&lt;div&gt;</code>&#x3001;<code>&lt;list-item&gt;</code>&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">flex-shrink</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">1</td>
<td style="text-align:left">&#x7236;&#x5BB9;&#x5668;&#x4E3A;<code>&lt;div&gt;</code>&#x3001;<code>&lt;list-item&gt;</code>&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">flex-basis</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">-1</td>
<td style="text-align:left">&#x7236;&#x5BB9;&#x5668;&#x4E3A;<code>&lt;div&gt;</code>&#x3001;<code>&lt;list-item&gt;</code>&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">position</td>
<td style="text-align:left">none&#x3001;fixed</td>
<td style="text-align:left">none</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">[left/top/right/bottom]</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">-</td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<h3 id="&#x52A8;&#x753B;&#x6837;&#x5F0F;">&#x52A8;&#x753B;&#x6837;&#x5F0F;</h3>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">transform-origin</td>
<td style="text-align:left"><code>&lt;position&gt;</code></td>
<td style="text-align:left">0px 0px</td>
<td style="text-align:left">&#x53D8;&#x6362;&#x539F;&#x70B9;&#x4F4D;&#x7F6E;&#xFF0C;&#x5355;&#x4F4D;&#x76EE;&#x524D;&#x4EC5;&#x652F;&#x6301;px&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;&#xFF1A;50px 100px&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">transform</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x8BE6;&#x89C1; transform &#x64CD;&#x4F5C;&#x8BF4;&#x660E;</td>
</tr>
<tr>
<td style="text-align:left">animation-name</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x4E0E;@keyframes&#x7684;name&#x76F8;&#x547C;&#x5E94;</td>
</tr>
<tr>
<td style="text-align:left">animation-delay</td>
<td style="text-align:left"><code>&lt;time&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x76EE;&#x524D;&#x652F;&#x6301;&#x7684;&#x5355;&#x4F4D;&#x4E3A;[s(&#x79D2;)\ms(&#x6BEB;&#x79D2;)]&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">animation-duration</td>
<td style="text-align:left"><code>&lt;time&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x76EE;&#x524D;&#x652F;&#x6301;&#x7684;&#x5355;&#x4F4D;&#x4E3A;[s(&#x79D2;)\ms(&#x6BEB;&#x79D2;)]&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">animation-iteration-count</td>
<td style="text-align:left"><code>&lt;integer&gt;</code></td>
<td style="text-align:left">1</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">animation-timing-function</td>
<td style="text-align:left">linear&#x3001;ease&#x3001;ease-in&#x3001;ease-out&#x3001;ease-in-out</td>
<td style="text-align:left">linear</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">animation-fill-mode</td>
<td style="text-align:left">none&#x3001;forwards</td>
<td style="text-align:left">none</td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p>transform &#x64CD;&#x4F5C;&#x8BF4;&#x660E;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">translateX</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">translateY</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">scaleX</td>
<td style="text-align:left"><code>&lt;multiple&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">scaleY</td>
<td style="text-align:left"><code>&lt;multiple&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">rotate</td>
<td style="text-align:left"><code>&lt;deg&gt;</code>&#x3001;<code>&lt;rad&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">rotateX</td>
<td style="text-align:left"><code>&lt;deg&gt;</code>&#x3001;<code>&lt;rad&gt;</code></td>
</tr>
<tr>
<td style="text-align:left">rotateY</td>
<td style="text-align:left"><code>&lt;deg&gt;</code>&#x3001;<code>&lt;rad&gt;</code></td>
</tr>
</tbody>
</table>
<p>@keyframes &#x5C5E;&#x6027;&#x8BF4;&#x660E;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">background-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">opacity</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">width/height</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6682;&#x4E0D;&#x652F;&#x6301;&#x767E;&#x5206;&#x6BD4;</td>
</tr>
<tr>
<td style="text-align:left">transform</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p>&#x6682;&#x65F6;&#x4E0D;&#x652F;&#x6301;&#x8D77;&#x59CB;&#x503C;(0%)&#x6216;&#x7EC8;&#x6B62;&#x503C;(100%)&#x7F3A;&#x7701;&#x7684;&#x60C5;&#x51B5;&#xFF0C;&#x901A;&#x8FC7;from&#x548C;to&#x663E;&#x793A;&#x6307;&#x5B9A;&#x8D77;&#x59CB;&#x548C;&#x7ED3;&#x675F;&#x3002;&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-css">@<span class="hljs-keyword">keyframes</span> Go {
  <span class="hljs-selector-tag">from</span> {
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#f76160</span>;
  }
  <span class="hljs-selector-tag">to</span> {
    <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#09ba07</span>;
  }
}
</code></pre>
<h3 id="&#x6E10;&#x53D8;&#x6837;&#x5F0F;">&#x6E10;&#x53D8;&#x6837;&#x5F0F;</h3>
<p>&#x6E10;&#x53D8; (gradients) &#x53EF;&#x4EE5;&#x5728;&#x4E24;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x6307;&#x5B9A;&#x7684;&#x989C;&#x8272;&#x4E4B;&#x95F4;&#x663E;&#x793A;&#x5E73;&#x7A33;&#x7684;&#x8FC7;&#x6E21;&#xFF0C;&#x7528;&#x6CD5;&#x4E0E;CSS&#x6E10;&#x53D8;&#x4E00;&#x81F4;&#x3002;
&#x5F53;&#x524D;&#x6846;&#x67B6;&#x652F;&#x6301;&#x4EE5;&#x4E0B;&#x6E10;&#x53D8;&#x6548;&#x679C;&#xFF1A;</p>
<ul>
<li>&#x7EBF;&#x6027;&#x6E10;&#x53D8; (linear-gradient)</li>
<li>&#x91CD;&#x590D;&#x7EBF;&#x6027;&#x6E10;&#x53D8; (repeating-linear-gradient)</li>
</ul>
<h4 id="&#x7EBF;&#x6027;&#x6E10;&#x53D8;--&#x91CD;&#x590D;&#x7EBF;&#x6027;&#x6E10;&#x53D8;">&#x7EBF;&#x6027;&#x6E10;&#x53D8; / &#x91CD;&#x590D;&#x7EBF;&#x6027;&#x6E10;&#x53D8;</h4>
<p>&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x7EBF;&#x6027;&#x6E10;&#x53D8;&#xFF0C;&#x9700;&#x8981;&#x5B9A;&#x4E49;&#x4E24;&#x7C7B;&#x6570;&#x636E;&#xFF1A;1) &#x8FC7;&#x6E21;&#x65B9;&#x5411;&#xFF1B;2) &#x8FC7;&#x6E21;&#x989C;&#x8272;&#xFF0C;&#x56E0;&#x6B64;&#x9700;&#x8981;&#x6307;&#x5B9A;&#x81F3;&#x5C11;&#x4E24;&#x79CD;&#x989C;&#x8272;&#x3002;</p>
<ol>
<li>&#x8FC7;&#x6E21;&#x65B9;&#x5411;&#xFF1A;&#x901A;&#x8FC7;direction&#x6216;&#x8005;angle&#x4E24;&#x79CD;&#x5F62;&#x5F0F;&#x6307;&#x5B9A;</li>
<li>&#x8FC7;&#x6E21;&#x989C;&#x8272;&#xFF1A;&#x652F;&#x6301;&#x540E;&#x9762;&#x4E09;&#x79CD;&#x65B9;&#x5F0F;&#xFF1A;red&#x3001;#FF0000&#x3001;rgb(255, 0, 0)&#x3001;rgba(255, 0, 0, 1)</li>
</ol>
<ul>
<li>direction&#xFF1A;&#x65B9;&#x5411;&#x6E10;&#x53D8;<ul>
<li>background: linear-gradient(direction, color-stop1, color-stop2, ...)</li>
<li>background: repeating-linear-gradient(direction, color-stop1, color-stop2, ...)</li>
</ul>
</li>
<li>angle&#xFF1A;&#x89D2;&#x5EA6;&#x6E10;&#x53D8;<ul>
<li>background: linear-gradient(angle, color-stop1, color-stop2)</li>
<li>background: repeating-linear-gradient(angle, color-stop1, color-stop2)</li>
</ul>
</li>
</ul>
<p>&#x53C2;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">direction</td>
<td style="text-align:left">to <code>&lt;side-or-corner&gt;</code>  <code>&lt;side-or-corner&gt;</code> = [left/right]&#x3001;[top/bottom]</td>
<td style="text-align:left">to bottom (&#x4ECE;&#x4E0A;&#x5230;&#x4E0B;&#x6E10;&#x53D8;)</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x4F8B;&#x5982;&#xFF1A;to right (&#x4ECE;&#x5DE6;&#x5411;&#x53F3;&#x6E10;&#x53D8;)&#xFF1B;&#x4F8B;&#x5982;&#xFF1A;to bottom right (&#x4ECE;&#x5DE6;&#x4E0A;&#x89D2;&#x5230;&#x53F3;&#x4E0B;&#x89D2;)&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x793A;&#x4F8B;</p>
<pre><code class="lang-css"><span class="hljs-selector-id">#gradient</span> {
  <span class="hljs-attribute">height</span>: <span class="hljs-number">100px</span>;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">200px</span>;
}


<span class="hljs-comment">/* &#x4ECE;&#x9876;&#x90E8;&#x5F00;&#x59CB;&#x6E10;&#x53D8;&#x3002;&#x8D77;&#x70B9;&#x662F;&#x7EA2;&#x8272;&#xFF0C;&#x6162;&#x6162;&#x8FC7;&#x6E21;&#x5230;&#x84DD;&#x8272; */</span>
<span class="hljs-selector-tag">background</span>: <span class="hljs-selector-tag">linear-gradient</span>(<span class="hljs-selector-tag">red</span>, <span class="hljs-selector-tag">blue</span>);

<span class="hljs-comment">/* 45&#x5EA6;&#x5939;&#x89D2;&#xFF0C;&#x4ECE;&#x7EA2;&#x8272;&#x6E10;&#x53D8;&#x5230;&#x84DD;&#x8272;  */</span>
<span class="hljs-selector-tag">background</span>: <span class="hljs-selector-tag">linear-gradient</span>(45<span class="hljs-selector-tag">deg</span>, <span class="hljs-selector-tag">rgb</span>(255, 0, 0), <span class="hljs-selector-tag">rgb</span>(0, 0, 255));

<span class="hljs-comment">/* &#x4ECE;&#x5DE6;&#x5411;&#x53F3;&#x6E10;&#x53D8;&#xFF0C;&#x5728;&#x8DDD;&#x79BB;&#x5DE6;&#x8FB9;90px&#x548C;&#x8DDD;&#x79BB;&#x5DE6;&#x8FB9;120px (200*0.6) &#x4E4B;&#x95F4;30px&#x5BBD;&#x5EA6;&#x5F62;&#x6210;&#x6E10;&#x53D8;*/</span>
<span class="hljs-selector-tag">background</span>: <span class="hljs-selector-tag">linear-gradient</span>(<span class="hljs-selector-tag">to</span> <span class="hljs-selector-tag">right</span>, <span class="hljs-selector-tag">rgb</span>(255,0,0) 90<span class="hljs-selector-tag">px</span>, <span class="hljs-selector-tag">rgb</span>(0, 0, 255) 60%);

<span class="hljs-comment">/* &#x4ECE;&#x5DE6;&#x5411;&#x53F3;&#x6E10;&#x53D8;&#xFF0C;&#x91CD;&#x590D;&#x6E10;&#x53D8;&#x533A;&#x57DF;10px&#xFF08;20-10&#xFF09;&#x900F;&#x660E;&#x5EA6;0.5 */</span>
<span class="hljs-selector-tag">background</span>: <span class="hljs-selector-tag">repeating-linear-gradient</span>(<span class="hljs-selector-tag">to</span> <span class="hljs-selector-tag">right</span>, <span class="hljs-selector-tag">rgba</span>(255, 0, 0, <span class="hljs-selector-class">.5</span>) 10<span class="hljs-selector-tag">px</span>,<span class="hljs-selector-tag">rgba</span>(0, 0, 255, <span class="hljs-selector-class">.5</span>) 20<span class="hljs-selector-tag">px</span>);
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="container.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 容器组件">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"通用","level":"1.4.1","depth":2,"next":{"title":"容器组件","level":"1.4.2","depth":2,"path":"component/container.md","ref":"component/container.md","articles":[]},"previous":{"title":"组件","level":"1.4","depth":1,"ref":"","articles":[{"title":"通用","level":"1.4.1","depth":2,"path":"component/general.md","ref":"component/general.md","articles":[]},{"title":"容器组件","level":"1.4.2","depth":2,"path":"component/container.md","ref":"component/container.md","articles":[]},{"title":"基础组件","level":"1.4.3","depth":2,"path":"component/basics.md","ref":"component/basics.md","articles":[]},{"title":"表单组件","level":"1.4.4","depth":2,"path":"component/form.md","ref":"component/form.md","articles":[]},{"title":"媒体组件","level":"1.4.5","depth":2,"path":"component/media.md","ref":"component/media.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"component/general.md","mtime":"2018-03-07T07:22:19.915Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-03-21T12:50:57.603Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

